# from DrissionPage import Chromium
#
# tab = Chromium().latest_tab
#
# tab.listen.start(["/explore/all"])
#
# tab.get("https://gitee.com/explore/all")
#
# res = tab.listen.wait()
# print(res.url)
#
# tab('@rel=next').click()
# res = tab.listen.wait()
# print(res.url)
# tab('@rel=next').click()
# res = tab.listen.wait()
# print(res.url)
# tab('@rel=next').click()
# res = tab.listen.wait()
# print(res.url)





# from DrissionPage import Chromium
#
# tab = Chromium().latest_tab
# tab.listen.start('gitee.com/explore')  # 开始监听，指定获取包含该文本的数据包
# tab.get('https://gitee.com/explore/all')  # 访问网址
#
# i = 0
# for packet in tab.listen.steps():
#     print(packet.url)  # 打印数据包url
#     tab('@rel=next').click()  # 点击下一页
#     i += 1
#     if i == 5:
#         break





# from DrissionPage import Chromium
#
# tab = Chromium().latest_tab
# tab.listen.start('api2/service/x_service/person_industry_list/list_industries_by_sort')  # 开始监听，指定获取包含该文本的数据包
# tab.get('https://www.xiniudata.com/industry/newest')  # 访问网址
#
# res = tab.listen.wait()
# print(res.response.body)



from DrissionPage import Chromium

tab = Chromium().latest_tab

tab.listen.start("/post")
tab.get('https://www.douyin.com/user/MS4wLjABAAAAIz1B9V2j-ThvTGMW2gvZSpQPUIpGbhEjDps1eaP5mWk?from_tab_name=main')  # 访问网址
res = tab.listen.wait()
for item in res.response.body['aweme_list']:
    print(item)

